﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using BaiduEditor.PluginInterface;
namespace FirstPlugin.UI
{
	public partial class AccountForm : Form
	{
		PluginResult result;
		public AccountForm(PluginResult result)
		{
			this.result = result;
			InitializeComponent();
			Init();
		}

		public void Init()
		{
			this.StartPosition = FormStartPosition.CenterScreen;
			this.FormBorderStyle = FormBorderStyle.FixedSingle;
			this.MaximizeBox = false;
		}

		private void btnTest_Click(object sender, EventArgs e)
		{
			if (result.IsSuccessful)
			{
				PluginAccount account = (PluginAccount)result.Value;
				MessageBox.Show(account.ID + Environment.NewLine +
								account.Name + Environment.NewLine +
								account.LocalStatus + Environment.NewLine +
								account.Performance + Environment.NewLine +
								account.ParentID);
			}
		}


	}
}
